# Contributor: knuxify <knuxify@gmail.com>
# Maintainer:
pkgname=pinta
pkgver=2.1.2
pkgrel=1
pkgdesc="Simple GTK# paint program"
url="https://www.pinta-project.com/"
arch="x86_64 aarch64 armv7"
license="MIT"
depends="dotnet8-runtime gtk+3.0"
makedepends="dotnet8-sdk gettext-dev gtk+3.0-dev intltool"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
source="https://github.com/PintaProject/Pinta/releases/download/$pkgver/pinta-$pkgver.tar.gz"

prepare() {
	default_prepare
	# Packaging fails without this
	sed -i '/^PINTA_BUILD_OPTS/ s/$/ -maxcpucount:1/' Makefile.in
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	make test
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
68b23a1ed9aef3794edd3410d2f7d92ce58ecbd96ec15a20bb263fca397ddd0a850ace32d3fcc291f4f3ab9147c5f40e7d7af249dc9c6fa9304417740fbad798  pinta-2.1.2.tar.gz
"
